<!DOCTYPE html>












  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">









  
  
    
  
  <link rel="stylesheet" media="all" href="https://cdnjs.cloudflare.com/ajax/libs/Han/3.3.0/han.min.css">




<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">



















  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






  

<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=6.3.0" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.3.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.3.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.3.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.3.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '6.3.0',
    sidebar: {"position":"left","display":"hide","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="Markdown简介 Markdown 是一种轻量级标记语言，它允许人们使用易读易写的纯文本格式编写文档，然后转换成格式丰富的HTML页面。    —— 维基百科  区块元素段落和换行一个 Markdown 段落是由一个或多个连续的文本行组成, 它的前后要有一个以上的空行(若某一行只包含空格和tab, 则该行也会被视为空行). 普通段落不该用空格或制表符来缩进. 段落内允许强迫换行(插入换行符).">
<meta name="keywords" content="Markdown">
<meta property="og:type" content="article">
<meta property="og:title" content="Markdown语法">
<meta property="og:url" content="http://codertang.com/2016/08/18/markdown/index.html">
<meta property="og:site_name" content="Tonny&#39;s Blog">
<meta property="og:description" content="Markdown简介 Markdown 是一种轻量级标记语言，它允许人们使用易读易写的纯文本格式编写文档，然后转换成格式丰富的HTML页面。    —— 维基百科  区块元素段落和换行一个 Markdown 段落是由一个或多个连续的文本行组成, 它的前后要有一个以上的空行(若某一行只包含空格和tab, 则该行也会被视为空行). 普通段落不该用空格或制表符来缩进. 段落内允许强迫换行(插入换行符).">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://codertang.com/2016/08/18/markdown/markdown.png">
<meta property="og:image" content="http://codertang.com/2016/08/18/markdown/markdown.png">
<meta property="og:image" content="http://codertang.com/2016/08/18/markdown/markdown.png">
<meta property="og:updated_time" content="2021-02-25T09:25:48.216Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Markdown语法">
<meta name="twitter:description" content="Markdown简介 Markdown 是一种轻量级标记语言，它允许人们使用易读易写的纯文本格式编写文档，然后转换成格式丰富的HTML页面。    —— 维基百科  区块元素段落和换行一个 Markdown 段落是由一个或多个连续的文本行组成, 它的前后要有一个以上的空行(若某一行只包含空格和tab, 则该行也会被视为空行). 普通段落不该用空格或制表符来缩进. 段落内允许强迫换行(插入换行符).">
<meta name="twitter:image" content="http://codertang.com/2016/08/18/markdown/markdown.png">






  <link rel="canonical" href="http://codertang.com/2016/08/18/markdown/">



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>Markdown语法 | Tonny's Blog</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Tonny's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <p class="site-subtitle">莫等闲, 白了少年头, 空悲切</p>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a>
  </li>

      
      
    </ul>
  

  
    

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://codertang.com/2016/08/18/markdown/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Tonny Yi">
      <meta itemprop="description" content="Coding, Life, Zen">
      <meta itemprop="image" content="/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Tonny's Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Markdown语法
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2016-08-18 17:41:42" itemprop="dateCreated datePublished" datetime="2016-08-18T17:41:42+08:00">2016-08-18</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2021-02-25 17:25:48" itemprop="dateModified" datetime="2021-02-25T17:25:48+08:00">2021-02-25</time>
              
            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Tools/" itemprop="url" rel="index"><span itemprop="name">Tools</span></a></span>

                
                
                  ，
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Tools/Writting/" itemprop="url" rel="index"><span itemprop="name">Writting</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body han-init-context" itemprop="articleBody">

      
      

      
        <h2 id="Markdown简介"><a href="#Markdown简介" class="headerlink" title="Markdown简介"></a>Markdown简介</h2><blockquote>
<p>Markdown 是一种轻量级标记语言，它允许人们使用易读易写的纯文本格式编写文档，然后转换成格式丰富的HTML页面。    —— <a href="https://zh.wikipedia.org/wiki/Markdown" target="_blank" rel="noopener">维基百科</a></p>
</blockquote>
<h2 id="区块元素"><a href="#区块元素" class="headerlink" title="区块元素"></a>区块元素</h2><h3 id="段落和换行"><a href="#段落和换行" class="headerlink" title="段落和换行"></a>段落和换行</h3><p>一个 Markdown 段落是由一个或多个连续的文本行组成, 它的前后要有一个以上的空行(若某一行只包含空格和tab, 则该行也会被视为空行). 普通段落不该用空格或制表符来缩进. 段落内允许强迫换行(插入换行符).<br>如果想强制新起一行则需要先输入2个以上的空格, 然后回车(好像不同编辑器效果不同).<br><a id="more"></a></p>
<h3 id="标题"><a href="#标题" class="headerlink" title="标题"></a>标题</h3><p>行首插入 1 到 6 个 <code>#</code>, 对应标题 1 到 6. 如: </p>
<pre><code># 这是 H1
## 这是 H2
###### 这是 H6
</code></pre><p>也可以在末尾输入对应个<code>#</code>, 这纯粹是为了美观.</p>
<pre><code># 这是H1 #
</code></pre><h3 id="分割线"><a href="#分割线" class="headerlink" title="分割线"></a>分割线</h3><p>在一行中使用三个以上的<code>*</code>, ‘-‘, <code>_</code>来建立分割线, 字符间可以用空格:</p>
<pre><code>* * *
***
___
------------
</code></pre><h2 id="区段元素"><a href="#区段元素" class="headerlink" title="区段元素"></a>区段元素</h2><h3 id="区块引用"><a href="#区块引用" class="headerlink" title="区块引用"></a>区块引用</h3><p>用于引用一段文字.</p>
<pre><code>&gt; This is a blockquote with two paragraphs. 
&gt; 
&gt; Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
&gt; id sem consectetuer libero luctus adipiscing.
</code></pre><p>效果: </p>
<blockquote>
<p>This is a blockquote with two paragraphs. </p>
<p>Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse<br>id sem consectetuer libero luctus adipiscing.</p>
</blockquote>
<p>也可以偷懒只在整个段落的第一行最前面加上<code>&gt;</code>:</p>
<pre><code>&gt; This is a blockquote with two paragraphs.

&gt; Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.
</code></pre><p>区块引用还可以嵌套, 只要根据层次加上不同数量的<code>&gt;</code>:</p>
<pre><code>&gt; This is the first level of quoting.
&gt;
&gt; &gt; This is nested blockquote.
&gt;
&gt; Back to the first level.
</code></pre><p>效果:</p>
<blockquote>
<p>This is the first level of quoting.</p>
<blockquote>
<p>This is nested blockquote.</p>
</blockquote>
<p>Back to the first level.</p>
</blockquote>
<p>区块引用内也可以使用其他的Markdown语法, 如标题, 列表, 代码块等:</p>
<pre><code>&gt; ## 这是一个标题。
&gt; 
&gt; 1.   这是第一行列表项。
&gt; 2.   这是第二行列表项。
&gt; 
&gt; 给出一些例子代码：
&gt; 
&gt;     return shell_exec(&quot;echo $input | $markdown_script&quot;);
</code></pre><p>效果:</p>
<blockquote>
<h2 id="这是一个标题。"><a href="#这是一个标题。" class="headerlink" title="这是一个标题。"></a>这是一个标题。</h2><ol>
<li>这是第一行列表项。</li>
<li>这是第二行列表项。</li>
</ol>
<p>给出一些例子代码：</p>
<pre><code>return shell_exec(&quot;echo $input | $markdown_script&quot;);
</code></pre></blockquote>
<h3 id="列表"><a href="#列表" class="headerlink" title="列表"></a>列表</h3><p>使用方法为一个列表标记 + 空格 + 内容,</p>
<p>无序列表使用<code>*</code>, <code>+</code>, <code>-</code>作为列表标记:</p>
<pre><code>* Red
* Green
* Blue
</code></pre><p>等同于:</p>
<pre><code>+ Red
+ Green
+ Blue
</code></pre><p>或:</p>
<pre><code>- Red
- Green
- Blue
</code></pre><p>效果(有的编辑器需要在列表前空一行):</p>
<ul>
<li>Red</li>
<li>Green</li>
<li>Blue</li>
</ul>
<p>有序列表使用数字加一个英文句点<code>.</code>:</p>
<pre><code>1. Red
2. Green
3. Blue
</code></pre><p>效果:</p>
<ol>
<li>Red</li>
<li>Green</li>
<li>Blue</li>
</ol>
<p>需要注意的是, 标记上使用的数字并不会影响最终输入到HTML结果, 因为最终输入的HTML为:</p>
<pre><code>&lt;ol&gt;
    &lt;li&gt;Red&lt;/li&gt;
    &lt;li&gt;Green&lt;/li&gt;
    &lt;li&gt;Blue&lt;/li&gt;
&lt;/ol&gt;
</code></pre><p>所以有序列表也可以这么写:</p>
<pre><code>1. Red
1. Green
1. Blue
</code></pre><p>如果列表见用空行分开, 在输入HTML时列表项目内容会被<code>&lt;p&gt;</code>包起来, 所以:</p>
<pre><code>* Bird

* Magic
</code></pre><p>效果是:</p>
<ul>
<li><p>Bird</p>
</li>
<li><p>Magic</p>
</li>
</ul>
<p>如果列表内容有多个段落, 则每个段落的段首必须缩进4个空格或一个tab. 如果列表项内包含引用, 则<code>&gt;</code>前也需要缩进. 如果要放代码块的话, 则需要缩进2次. 例:</p>
<pre><code>*   This is a list item with two paragraphs.

    This is the second paragraph in the list item. You&apos;re
    only required to indent the first line. Lorem ipsum dolor
    sit amet, consectetuer adipiscing elit.

    &gt; This is a blockquote
    &gt; inside a list item.

        funtion test() {
            console.info(&quot;Hello&quot;);
        }
</code></pre><p>可以使用<code>\</code>转义列表标识, 防止误渲染.</p>
<h3 id="代码"><a href="#代码" class="headerlink" title="代码"></a>代码</h3><p>通过缩进4个空格或一个tab就可以建立代码块(前面最好加上一个空行):</p>
<pre><code>funtion test() {
    console.info(&quot;Hello&quot;);
}

public static void main(String[] args) {
    System.out.print(&quot;Hello&quot;);
}
</code></pre><p>有点编辑器支持代码高亮, 则可以使用 三个` + 语言, 末尾在加三个`的方式:</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">@Controller</span></span><br><span class="line"><span class="meta">@RequestMapping</span>(value = <span class="string">"/case"</span>)</span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">CaseController</span> <span class="keyword">extends</span> <span class="title">AbstractController</span> </span>&#123;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@RequestMapping</span>(method = RequestMethod.GET)</span><br><span class="line">    <span class="function"><span class="keyword">public</span> String <span class="title">goPage</span><span class="params">()</span> </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="string">"case"</span>;</span><br><span class="line">    &#125;</span><br><span class="line">    </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="区块元素-1"><a href="#区块元素-1" class="headerlink" title="区块元素"></a>区块元素</h2><h3 id="链接"><a href="#链接" class="headerlink" title="链接"></a>链接</h3><p>Markdown支持两种形式的链接, 行内 和 参考式. 不管哪种, 链接文字都用<code>[]</code>包裹.<br>要建立一个行内式的链接, 只要在方块括号后面紧接着圆括号并插入网址链接即可, 如果你还想要加上链接的 title 文字, 只要在网址后面, 用双引号把 title 文字包起来即可.</p>
<pre><code>This is [Baidu](http://www.baidu.com/ &quot;This is a title&quot;) inline link.
This is [Baidu](http://www.baidu.com/) inline link without title attribute.
</code></pre><p>效果:<br>This is <a href="http://www.baidu.com/" title="This is a title" target="_blank" rel="noopener">Baidu</a> inline link. This is <a href="http://www.baidu.com/" target="_blank" rel="noopener">Baidu</a> inline link without title attribute.</p>
<p>如果你要连接到通主机的资源, 则可以使用相对路径:</p>
<pre><code>See my [Home](/) page for details.
</code></pre><p>See my <a href="/">Home</a> page for details.</p>
<p>参考式的链接是在链接文字的括号后面再接上另一个方括号, 而在第二个方括号里面要填入用以辨识链接的标记:</p>
<pre><code>This is [an example][id] reference-style link.
</code></pre><p>接着, 在文件的任意处, 你可以把这个标记的链接内容定义出来:</p>
<pre><code>[id]: http://example.com/  &quot;Optional Title Here&quot;
</code></pre><p>效果:<br>This is [an example][id] reference-style link.<br>[id]: <a href="http://example.com/" target="_blank" rel="noopener">http://example.com/</a>  “Optional Title Here”</p>
<h3 id="强调"><a href="#强调" class="headerlink" title="强调"></a>强调</h3><p>使用<code>*</code> 或 <code>_</code>包裹, :</p>
<pre><code>*斜体* 或者 _斜体_ 
**粗体** 或者 __粗体__ 
***粗斜体*** 或者 ___粗斜体___ 
</code></pre><p>效果:<br><em>斜体</em> 或者 _斜体_ <strong>粗体</strong> 或者 <strong>粗体</strong> <strong><em>粗斜体</em></strong> 或者 <strong><em>粗斜体</em></strong></p>
<h3 id="行内代码"><a href="#行内代码" class="headerlink" title="行内代码"></a>行内代码</h3><p>使用`包裹, 如果要在代码区段内插入反引号, 你可以用多个反引号来开启和结束代码区段:</p>
<pre><code>Use the `print()` function. ``print(`)`` will print a \`.
</code></pre><p>效果:<br>Use the <code>print()</code> function. <code>print(`)</code> will print a `.</p>
<h3 id="图片"><a href="#图片" class="headerlink" title="图片"></a>图片</h3><p>Markdown 使用一种和链接很相似的语法来标记图片, 同样有行内式 和 参考式:</p>
<pre><code>![Markdown Logo](markdown.png)
![Markdown Logo](markdown.png &quot;Optional title&quot;)

![Alt text][id]
</code></pre><p><img src="markdown.png" alt="Alt text" title="Optional title"><br><img src="markdown.png" alt="Alt text" title="Optional title"></p>
<p>Markdown目前无法指定图片的宽高, 如果需要的话, 只能使用<code>&lt;img&gt;</code>标签.</p>
<pre><code>&lt;img src=&apos;markdown.png&apos; width=&apos;60px&apos;&gt;    
</code></pre><p><img src="markdown.png" width="60px"></p>
<h3 id="表格"><a href="#表格" class="headerlink" title="表格"></a>表格</h3><pre><code>| dog | bird | cat |
| --- | ---- | --- |
| foo | foo  | foo |
| bar | bar  | bar |
| baz | baz  | baz |
</code></pre><table>
<thead>
<tr>
<th>dog</th>
<th>bird</th>
<th>cat</th>
</tr>
</thead>
<tbody>
<tr>
<td>foo</td>
<td>foo</td>
<td>foo</td>
</tr>
<tr>
<td>bar</td>
<td>bar</td>
<td>bar</td>
</tr>
<tr>
<td>baz</td>
<td>baz</td>
<td>baz</td>
</tr>
</tbody>
</table>
<p>也可以指定列的对齐方向:</p>
<pre><code>dog | bird | cat
:---|:----:|---:
foo | foo  | foo
bar | bar  | bar
baz | baz  | baz
</code></pre><table>
<thead>
<tr>
<th style="text-align:left">dog</th>
<th style="text-align:center">bird</th>
<th style="text-align:right">cat</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">foo</td>
<td style="text-align:center">foo</td>
<td style="text-align:right">foo</td>
</tr>
<tr>
<td style="text-align:left">bar</td>
<td style="text-align:center">bar</td>
<td style="text-align:right">bar</td>
</tr>
<tr>
<td style="text-align:left">baz</td>
<td style="text-align:center">baz</td>
<td style="text-align:right">baz</td>
</tr>
</tbody>
</table>
<h4 id="语法说明"><a href="#语法说明" class="headerlink" title="语法说明"></a>语法说明</h4><ul>
<li><code>|</code>, <code>-</code>, <code>:</code>之间的多余空格会被忽略</li>
<li>默认标题栏居中对齐, 内容居左对齐</li>
<li><code>:-</code>表示内容和标题栏居左对齐, <code>:-:</code>表示内容和标题栏居中对齐, <code>-:</code>表示内容和标题栏居右对齐</li>
<li>内容和<code>|</code>之间的多余空格会被忽略, 每行的第一个和最后一个<code>|</code>可以省略, <code>-</code>至少要有一个</li>
</ul>
<h3 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h3><p><a href="http://wowubuntu.com/markdown/" target="_blank" rel="noopener">wowubuntu.com</a><br><a href="http://glgjing.github.io/blog/2015/04/03/markdown-biao-ge-yu-fa/" target="_blank" rel="noopener">GLGJing’s Blog</a></p>

      
    </div>

    

    
    
    

    

    

    
      <div>
        <ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>Tonny Yi</li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://codertang.com/2016/08/18/markdown/" title="Markdown语法">http://codertang.com/2016/08/18/markdown/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc/4.0/" rel="external nofollow" target="_blank">CC BY-NC 4.0</a> 许可协议。转载请注明出处！</li>
</ul>

      </div>
    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Markdown/" rel="tag"># Markdown</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/08/26/arraylist/" rel="prev" title="Java源码 - Collection - ArrayList">
                Java源码 - Collection - ArrayList <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/avatar.png" alt="Tonny Yi">
            
              <p class="site-author-name" itemprop="name">Tonny Yi</p>
              <p class="site-description motion-element" itemprop="description">Coding, Life, Zen</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">49</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">42</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">59</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/tonnyyi" target="_blank" title="GitHub"><i class="fa fa-fw fa-github"></i>GitHub</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="mailto:tonnyemails@gmail.com" target="_blank" title="E-Mail"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  
                </span>
              
            </div>
          

          
          
            <div class="cc-license motion-element" itemprop="license">
              <a href="https://creativecommons.org/licenses/by-nc/4.0/" class="cc-opacity" target="_blank">
                <img src="/images/cc-by-nc.svg" alt="Creative Commons">
              </a>
            </div>
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#Markdown简介"><span class="nav-number">1.</span> <span class="nav-text">Markdown简介</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#区块元素"><span class="nav-number">2.</span> <span class="nav-text">区块元素</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#段落和换行"><span class="nav-number">2.1.</span> <span class="nav-text">段落和换行</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#标题"><span class="nav-number">2.2.</span> <span class="nav-text">标题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#分割线"><span class="nav-number">2.3.</span> <span class="nav-text">分割线</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#区段元素"><span class="nav-number">3.</span> <span class="nav-text">区段元素</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#区块引用"><span class="nav-number">3.1.</span> <span class="nav-text">区块引用</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#这是一个标题。"><span class="nav-number">4.</span> <span class="nav-text">这是一个标题。</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#列表"><span class="nav-number">4.1.</span> <span class="nav-text">列表</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#代码"><span class="nav-number">4.2.</span> <span class="nav-text">代码</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#区块元素-1"><span class="nav-number">5.</span> <span class="nav-text">区块元素</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#链接"><span class="nav-number">5.1.</span> <span class="nav-text">链接</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#强调"><span class="nav-number">5.2.</span> <span class="nav-text">强调</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#行内代码"><span class="nav-number">5.3.</span> <span class="nav-text">行内代码</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#图片"><span class="nav-number">5.4.</span> <span class="nav-text">图片</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#表格"><span class="nav-number">5.5.</span> <span class="nav-text">表格</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#语法说明"><span class="nav-number">5.5.1.</span> <span class="nav-text">语法说明</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#参考"><span class="nav-number">5.6.</span> <span class="nav-text">参考</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2021</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Tonny Yi</span>

  

  
</div>


  <script src="https://unpkg.com/mermaid@7.1.2/dist/mermaid.min.js"></script>
  <script>
    if (window.mermaid) {
      mermaid.initialize("");
    }
  </script>





  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://theme-next.org">NexT.Mist</a></div>




        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.3.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.3.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.3.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.3.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.3.0"></script>



  



	





  





  










  





  

  

  

  

  
  

  

  

  

  

  
  <style>
    .copy-btn {
      display: inline-block;
      padding: 6px 12px;
      font-size: 13px;
      font-weight: 700;
      line-height: 20px;
      color: #333;
      white-space: nowrap;
      vertical-align: middle;
      cursor: pointer;
      background-color: #eee;
      background-image: linear-gradient(#fcfcfc, #eee);
      border: 1px solid #d5d5d5;
      border-radius: 3px;
      user-select: none;
      outline: 0;
    }

    .highlight-wrap .copy-btn {
      transition: opacity .3s ease-in-out;
      opacity: 0;
      padding: 2px 6px;
      position: absolute;
      right: 4px;
      top: 8px;
    }

    .highlight-wrap:hover .copy-btn,
    .highlight-wrap .copy-btn:focus {
      opacity: 1
    }

    .highlight-wrap {
      position: relative;
    }
  </style>
  <script>
    $('.highlight').each(function (i, e) {
      var $wrap = $('<div>').addClass('highlight-wrap')
      $(e).after($wrap)
      $wrap.append($('<button>').addClass('copy-btn').append('复制').on('click', function (e) {
        var code = $(this).parent().find('.code').find('.line').map(function (i, e) {
          return $(e).text()
        }).toArray().join('\n')
        var ta = document.createElement('textarea')
        document.body.appendChild(ta)
        ta.style.position = 'absolute'
        ta.style.top = '0px'
        ta.style.left = '0px'
        ta.value = code
        ta.select()
        ta.focus()
        var result = document.execCommand('copy')
        document.body.removeChild(ta)
        
          if(result)$(this).text('复制成功')
          else $(this).text('复制失败')
        
        $(this).blur()
      })).on('mouseleave', function (e) {
        var $b = $(this).find('.copy-btn')
        setTimeout(function () {
          $b.text('复制')
        }, 300)
      }).append(e)
    })
  </script>


</body>
</html>
